﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using H2.NET.Business.Core;
using H2.NET.Web.Workflow.Services;
using H2.NET.Web.Workflow.DwzCode;
using H2.NET.Common;

namespace H2.NET.Web.Management.Role
{
    public partial class Create : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RoleService roleService = new RoleService();

            var action = AksRequest.GetQueryString("action");
            if (action == "save")
            {
                var role = new t_mdc_Role();
                role.Name = AksRequest.GetFormString("name");
                role.Remark = AksRequest.GetFormString("Remark");
                roleService.Add(role);

                SuccessMsg("RoleIndex");
            }
        }
    }
}